<?
	/* Se asegura que el archivo es incluido por el index */
	defined( 'LOAD_MODULE_ACTION' ) or die( 'No esta permitido el acceso directo a ' . __FILE__ );
		$this->oTmpObject = new designer_frm( $this );

	class designer_frm extends Frm
	{
	function setValue ( $id )
		{
			$cSql = "DBMODEL->METADATA->TABLES->TABLE[ID=$id]";
			$aDatos = $this->oDatabaseXML->getArray($cSql);
			$this->setFieldsArray ( $aDatos );
		}
	function designer_frm( &$oModule )
		{
			$this->Frm( $oModule );
			if( getParam( 'cFileXML')  ) $this->oDatabaseXML = openDB( DB_XML, getParam('cFileXML') );
			//Crea los Objetos de los campos de edicion
			$this->aFields['ID']					= new InputNumber( "ID", "ID" );
			$this->aFields['Tablename']		= new InputText( "Tablename", "Tablename" );
			$this->aFields['PrevTableName']	= new InputText( "PrevTableName", "PrevTableName" );
			$this->aFields['XPos']				= new InputNumber( "XPos", "XPos" );
			$this->aFields['YPos'] 				= new InputNumber( "YPos", "YPos" );
			$this->aFields['TableType']		= new InputList( "TableType", "TableType" );
			$this->aFields['TablePrefix']		= new InputText( "TablePrefix", "TablePrefix" );
			$this->aFields['nmTable']			= new InputText( "nmTable", "nmTable" );
			$this->aFields['Temporary']		= new InputText( "Temporary", "Temporary" );
			$this->aFields['UseStandardInserts']	= new InputList( "UseStandardInserts", "UseStandardInserts" );
			$this->aFields['StandardInserts']			= new InputText( "StandardInserts", "StandardInserts" );
			$this->aFields['TableOptions']				= new InputText( "TableOptions", "TableOptions" );
			$this->aFields['Comments']				= new InputText( "Comments", "Comments" );
			$this->aFields['Collapsed']					= new InputNumber( "Collapsed", "Collapsed" );
			$this->aFields['IsLinkedObject']			= new InputNumber( "IsLinkedObject", "IsLinkedObject" );
			$this->aFields['IDLinkedModel']			= new InputNumber( "IDLinkedModel", "IDLinkedModel" );
			$this->aFields['Obj_id_Linked']			= new InputNumber( "Obj_id_Linked", "Obj_id_Linked" );
			$this->aFields['OrderPos']					= new InputNumber( "OrderPos", "OrderPos" );
		}
	function initializeForm()
		{
			// Si viene el Ubicacion hace el retrieve
				if ( $this->isRetrievable() )
				{
					$this->setValue( getParam( 'id')  );
				}
			// Configura el Titulo
				$this->setLabel( "DBDesigner" );
			return true;
		}
	function initializeField( $cField , &$oField )
		{
			switch ( $cField )
			{
				case '':
					break;
			}
 		}
	}
?>